package www.wen.com.common.lib.util

import androidx.databinding.BindingAdapter
import com.scwang.smart.refresh.layout.SmartRefreshLayout

/**
 * Created by luyao
 * on 2019/12/27 14:34
 */
@BindingAdapter("isRefresh")
fun SmartRefreshLayout.isRefresh(isRefresh: Boolean) {
    isRefresh(isRefresh)
}

@BindingAdapter("onRefresh")
fun SmartRefreshLayout.onRefresh(action: () -> Unit) {
    setOnRefreshListener {
        action()
    }
}